package com.chen.service.impl;

import com.chen.config.Constant;
import com.chen.config.RedisPubService;
import com.chen.service.PublisherService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Slf4j
@Service
public class PublisherServiceImpl implements PublisherService {
    @Autowired
    private RedisPubService redisService;

    @Override
    public String pushMsg(String message) {
        log.info("发布消息...");
        redisService.sendChannelMessage(Constant.CHANNEL,message);
        return "success";
    }
}
